import java.util.Scanner;


public class Test {
    public static AdminUser menu() {
        Login login = new Login();
        login.setUserName("abc");
        login.setPassWord("123");
        System.out.println("<----------Dream Travel---------->");
        System.out.println("===========Admin Login============");
        Scanner scanner = new Scanner(System.in);
        System.out.println("Username:Please enter Username");
        String str1 = scanner.nextLine();
        System.out.println("Password:Please enter Password");
        String str2 = scanner.nextLine();
        login.logInfo(str1, str2);
        System.out.println("登陆成功");
        System.out.println("Login successful!!!");
        System.out.println("<----------Dream Travel---------->");
        System.out.println("===========welcome Admin============");
        System.out.println("1.Tour Packages");
        System.out.println("2.Tourist Record");
        System.out.println("3.View Records");
        System.out.println("4.Logout");
        String name ="AdminUser";
        System.out.println("Please enter your choice");
        int choice = scanner.nextInt();
        switch (choice) {
            case 1:
                return new TourPackages(name);
            case 2:
                return new TouristRecord(name);
            case 3:
                return new ViewRecords(name);
            case 4:
                menu();
                break;
            default:
                System.out.println("wrong");
                break;
        }
        return null;
    }
    public static void main(String[] args) {
        AdminUser adminUser=menu();
        while(true){
            adminUser.menu();
        }
    }
}




